package com.lantosec.hmrp.modules.category.vo;

import com.lantosec.hmrp.modules.category.entity.AssetsSupplierDirectory;
import com.lantosec.hmrp.core.mvc.BaseVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 供应商及厂家目录 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-03-31
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="AssetsSupplierDirectory对象", description="供应商及厂家目录")
public class AssetsSupplierDirectoryVO extends BaseVO<AssetsSupplierDirectory> {
    private static final long serialVersionUID = 1L;


    public AssetsSupplierDirectoryVO(AssetsSupplierDirectory entity){
        this.supplierId = entity.getSupplierId();
        this.supplier = entity.getSupplier();
        this.type = entity.getType();
        this.manualFlag = entity.getManualFlag();
    }

    @Override
    public AssetsSupplierDirectory convertToEntity(){
        return new AssetsSupplierDirectory(this);
    }


    @ApiModelProperty(value = "ID(his目录直接取，手工录入格式：SUPxxxx)")
    private String supplierId;

    @ApiModelProperty(value = "名称")
    private String supplier;

    @ApiModelProperty(value = "类型(his目录直接取，手工录入留空)")
    private String type;

    @ApiModelProperty(value = "是否手工录入(0 否,来自his目录；1 是)")
    private Integer manualFlag;


}
